package com.future.hedongjun.home.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.future.hedongjun.R;
import com.future.hedongjun.home.bean.MessageBean;

import java.util.List;

/**
 * @author jniu
 * @Email niuxiaoqi@hztianque.com
 * @time 2018/11/17
 */
public class MessageAdapter extends BaseQuickAdapter<MessageBean, BaseViewHolder> {
    public MessageAdapter(@Nullable List<MessageBean> data) {
        super(R.layout.recycler_item_message, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MessageBean item) {
        helper.setText(R.id.tv_time, item.getCreate_time());
        helper.setText(R.id.tv_title, item.getReal_id());
        helper.setText(R.id.tv_content, item.getUser_cotent());
        helper.addOnClickListener(R.id.cardView);
    }
}
